-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLANET-7714 Fix Sentry errors #2490
base: main
Are you sure you want to change the base?
Conversation
/unhold 4343ccaf-2729-45a7-be4d-46e370db320d
Test instance is ready 🚀🌑 proteus | admin | blocks report | CircleCI | composer-local.json ⌚ 2025.01.01 05:26:04 |
/unhold 9da77d7e-741e-401d-aec4-f6632ebcba94
/unhold 760a45ae-f36c-410d-b215-f8f8689227bf
4dbe0d2
to
4d35adf
Compare
/unhold 6059dba8-77c9-4deb-ae53-fd34e3a20cd6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to modify a migration script that was already run?
|
||
if ($redirect_id) { | ||
if ($redirect_page) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return $item !== null | ||
&& $nav_menu_item !== null | ||
&& $item->menu_item_parent === $nav_menu_item->menu_item_parent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it simpler?
return $item !== null | |
&& $nav_menu_item !== null | |
&& $item->menu_item_parent === $nav_menu_item->menu_item_parent; | |
return $item && $nav_menu_item && $item->menu_item_parent === $nav_menu_item->menu_item_parent; |
@@ -435,7 +437,7 @@ function render_navigation_block(array $attributes): string | |||
// For child pages, only show link to the parent | |||
if ($submenu_page->menu_item_parent !== 0) { | |||
$parent_item = array_filter($menu_items, function ($item) use ($submenu_page) { | |||
return (int) $item->ID === (int) $submenu_page->menu_item_parent; | |||
return $submenu_page !== null && (int) $item->ID === (int) $submenu_page->menu_item_parent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here:
return $submenu_page !== null && (int) $item->ID === (int) $submenu_page->menu_item_parent; | |
return $item && $submenu_page && (int) $item->ID === (int) $submenu_page->menu_item_parent; |
Ref. https://jira.greenpeace.org/browse/PLANET-7714
Summary
Fix below type errors
Sentry error
Sentry Error